//
//  MHChangeFromViewController.m
//  ManHua
//
//  Created by 江子安 on 15/11/3.
//  Copyright © 2015年 蓝欧科技. All rights reserved.
//

#import "MHChangeFromViewController.h"

@interface MHChangeFromViewController ()<UITextFieldDelegate>
@property (nonatomic, strong) UITextField *fromTF;
@end

@implementation MHChangeFromViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.navigationItem.title = @"来自哪里";
    self.navigationController.navigationBar.titleTextAttributes = [NSDictionary dictionaryWithObjectsAndKeys:kThemeColor,UITextAttributeTextColor,nil];
    
    
    
    
    self.fromTF = [[UITextField alloc]initWithFrame:CGRectMake(10, 94, Width - 20, 44)];
    _fromTF.text = self.userInfo.UserForm;
    _fromTF.backgroundColor = [UIColor whiteColor];
    _fromTF.delegate = self;
    _fromTF.clearButtonMode = UITextFieldViewModeWhileEditing;
    _fromTF.borderStyle = UITextBorderStyleRoundedRect;
    [_fromTF addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];
    [self.view addSubview:_fromTF];
    
}

- (void) textFieldDidChange:(id) sender {
    UITextField *textField = (UITextField *)sender;
    _from = textField.text;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
